home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group00a.txt
/
000063_icon-group-sender _Thu Apr 13 12:43:11 2000.msg
< prev
next >
Wrap
Internet Message Format
|
2001-01-03
|
2KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.9.1a/8.9.1) id MAA14559
for icon-group-addresses; Thu, 13 Apr 2000 12:41:47 -0700 (MST)
Message-Id: <200004131941.MAA14559@baskerville.CS.Arizona.EDU>
Date: Thu, 13 Apr 2000 09:00:07 -0700 (MST)
From: Gregg Townsend <gmt@baskerville.CS.Arizona.EDU>
To: eddie@holyrood.ed.ac.uk, icon-group@optima.CS.Arizona.EDU
Subject: Re: changes to proc() ??
Errors-To: icon-group-errors@optima.CS.Arizona.EDU
Status: RO
The effect you're seeing is due to a change in the Icon linker
a few years ago. To avoid wasting space, the linker discards
procedures that are never referenced in the code. This makes a
huge difference (megabytes vs. kilobytes) for some programs that
reference library procedures.
Since in your example the procedure show() is never referenced,
it is discarded, and so it's no longer around to be found by
proc("show"). A simple solution is to just reference any such
procedures once in the code -- they don't need to be called,
just referenced.
For example:
procedure main()
references()
p := proc(read())
...
end
procedure references()
# list otherwise unreferenced procedures here
show
...
end
Alternatively you can use the "invocable" declaration:
invocable "show"
There's also
invocable all
but that completely disables the suppression of unused code.
---------------------------------------------------------------------------
Gregg Townsend Staff Scientist The University of Arizona
gmt@cs.arizona.edu Computer Science Tucson, Arizona, USA